//
//  ORUserTextField.m
//  NewsHots
//
//  Created by rimi on 2016/12/7.
//  Copyright © 2016年 zhongshuilian. All rights reserved.
//

#import "ORUserTextField.h"

@interface ORUserTextField ()<UITextFieldDelegate>

@end

@implementation ORUserTextField

- (instancetype)initWithFrame:(CGRect)frame WithIconName:(NSString *)iconName WithPlaceholder:(NSString *)placeholder{
    
    self = [super initWithFrame:frame];
    if (self) {
        //子类改造
        UIImageView *iconImageView = [[UIImageView alloc]initWithFrame:AAdaptionRect(-(32+10), 0, 32, 32)];
        iconImageView.image = [UIImage imageNamed:iconName];
        [self addSubview:iconImageView];
        UILabel *linelabel = [[UILabel alloc]initWithFrame:AAdaptionRect(0, self.frame.size.height/AAdaptationWidth()-2, self.frame.size.width/AAdaptationWidth(), 2)];
        linelabel.backgroundColor = MainColor;
        [self addSubview:linelabel];
        self.placeholder = placeholder;
        self.delegate = self;
    }
    return self;
}

@end
